<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>创建完全档</title>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/loading.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="./newstyle/css/style.css"/>
    <script src="./newstyle/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <style type="text/css">
		.create{
			width: 100%;
			height: 100%;
			align-content: center;
			text-align: center;
		}
		.form{
			text-align: center;
			align-content: center;
			margin-top: 30px;
		}
		.table{
			width: 100%;
			height: auto;
		}
		.create input[type=button]{
			width: 75%;
			height: 60px;
			margin-right: 0px;
			font-size: 20px;
			background-color:#9999ff;
		} 
		a{color: #000;}
	</style>
    <script type="text/javascript">
    	$(window).load(function(){
    		$(".loading").addClass("loader-chanage")
    		$(".loading").fadeOut(300) 
    	})
    </script>
	<script type="text/javascript">
		<!--window.onload=function (){-->
			<!--//idcardIntentShow();//读卡返回数据显示-->
			<!--//pictureShow();//拍照返回数据显示-->
		<!--}-->
		function toActivity(activityName){
			if(activityName=="TakePictureActivity"){
				createCompleteFile.toActivity(activityName);
				//pictureShow();//拍照返回数据显示
			}else if(activityName=="Aisino_A90_idcardActivity"){
				createCompleteFile.toActivity(activityName);
				//idcardIntentShow();//读卡返回数据显示
			}else if(activityName=="OtherInfoActivity"){
				createCompleteFile.toActivity(activityName);
				//alert("获取返回数据");//？未解决：必须重新进入Activity js方法才能取到值
				//otherShow();//其他信息录入的返回结果显示
			}else{
				createCompleteFile.toActivity(activityName);
			}
		}

		function idcardIntentShow(){
		 var idcardJson=createCompleteFile.idcardIntent();
		 //alert(idcardJson);
		  idcardJson=eval(idcardJson);
			if(idcardJson!=null){
				//$("#idcardImgSpan").removeClass('imgSpan');
				//设置图标 正确
				document.getElementById("image_idcard").src="icon/yes.png";
				var str="";
				str+="<button onclick='idcardIntentShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
				document.getElementById("idcardInfo").innerHTML=str;
				idcardInfo(idcardJson);
			}else{
				//设置图标 错误
				document.getElementById("image_idcard").src="icon/no.png";
				document.getElementById("idcardInfo").innerHTML="";
			}


		}
		//遍历idcardJson，写入页面
		function idcardInfo(idcardJson){
			var str="";
			str+="<div id='' style='border: 0px solid;margin-left: 15px;margin-right: 55px;background-color: #3CC4C4;color: white;'>"+
					"姓名："+idcardJson[0].name+"<br />"+
					"性别："+idcardJson[0].sex+"<br />"+
					"民族："+idcardJson[0].mingzu+"<br />"+
					"出生年月："+idcardJson[0].birthday+"<br />"+
					"地址："+idcardJson[0].address+"<br />"+
					"身份证号："+idcardJson[0].number+"<br />"+
					"签发机关："+idcardJson[0].qianfa+"<br />"+
					"生效时间："+idcardJson[0].end+"<br />"+
				 "</div>"+
				 "<button onclick='idcardIntentHide()' style='margin-left: 17px;'>"+"收起信息"+"</button>";
			document.getElementById("idcardInfo").innerHTML=str;
		}
		//点击隐藏详细信息
		function idcardIntentHide(){
			var str="";
			str+="<button onclick='idcardIntentShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
			document.getElementById("idcardInfo").innerHTML=str;
		}
		//检查是否录入录入完整
		function checkUp(){
			var idcard=document.getElementById("idcardInfo").innerText;
			var oldcard=document.getElementById("oldCardInfo").innerText;
			if(null!=idcard&&""!=idcard&&null!=oldcard&&""!=oldcard){//返回值都不为空时，才能提交
				alert("可以提交");
			}else{
				alert("您还未完整录入！不能进行提交");
				return false;
			}
		}
		function pictureShow(){
			//处理显示返回拍照保存返回数据
			//var pictureResult=pictureIntent();
			var pictureResult=createCompleteFile.pictureIntent();
			//alert(pictureResult);
			if(null!=pictureResult&&""!=pictureResult){
				//改变图标，显示返回结果
				//设置图标 正确
				document.getElementById("image_picture").src="icon/yes.png";
				var str="";
				str+="<button onclick='pictureShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
				document.getElementById("pictureInfo").innerHTML=str;
				pictureInfo(pictureResult);
			}else{
				//设置图标 错误
				document.getElementById("image_picture").src="icon/no.png";
 				document.getElementById("pictureInfo").innerHTML="";
			}
		}
		//采集人脸返回数据处理
		function pictureInfo(pictureResult){
			var str="";
			str+="<div id='' style='border: 0px solid;margin-left: 15px;margin-right: 55px;background-color: #3CC4C4;color: white;'>"+
				pictureResult+
				 "</div>"+
				 "<button onclick='pictureIntentHide()' style='margin-left: 17px;'>"+"收起信息"+"</button>";
			document.getElementById("pictureInfo").innerHTML=str;
		}
		function pictureIntentHide(){
			var str="";
			str+="<button onclick='pictureShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
			document.getElementById("pictureInfo").innerHTML=str;
		}
		//其他信息处理
		function otherShow(){
			 var otherResult=createCompleteFile.otherIntent();
		  //otherResult=eval(otherResult);
			if(otherResult!="失败"){
				//设置图标 正确
				document.getElementById("image_other").src="icon/yes.png";
				var str="";
				str+="<button onclick='otherShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
				document.getElementById("otherInfo").innerHTML=str;
				otherInfo(otherResult);
			}else{
				//设置图标 错误
				document.getElementById("image_other").src="icon/no.png";
				document.getElementById("otherInfo").innerHTML="";
			}
		}
		//其他信息，返回信息
		function otherInfo(otherResult){
			var str="";
			str+="<div id='' style='border: 0px solid;margin-left: 15px;margin-right: 55px;background-color: #3CC4C4;color: white;'>"+
				 "返回信息："+otherResult+
				 "</div>"+
				 "<button onclick='otherIntentHide()' style='margin-left: 17px;'>"+"收起信息"+"</button>";
			document.getElementById("otherInfo").innerHTML=str;
		}
		//隐藏
		function otherIntentHide(){
			var str="";
			str+="<button onclick='otherShow()' style='margin-left: 17px;'>"+"查看信息"+"</button>";
			document.getElementById("otherInfo").innerHTML=str;
		}

	</script>


		<!--loading页开始-->
	<div class="loading">
		<div class="loader">
	        <div class="loader-inner pacman">
	          <div></div>
	          <div></div>
	          <div></div>
	          <div></div>
	          <div></div>
	        </div>
		</div>
	</div>
	<!--loading页结束-->
</head>
<body>
	<header class="top-header fixed-header">
			<a class="icona" href="javascript:history.go(-1)">
					<!-- <img src="./newstyle/images/left.png"/> -->
			</a>
			<h3>创建完全档</h3>
			<a class="iconb" href="#">
			</a>
	</header>

	<div class="contaniner fixed-cont">
		<section class="to-buy">
			<header> 
				<div class="to-now"> 
					<div class="tonow"> 
					</div> 
					<dl>
						<a href="javascript:void(0);"  onclick="toActivity('Aisino_A90_idcardActivity')">
						<dt>
							<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;读取身份证信息</b>
							<span id="idcardImgSpan" class="imgSpan idcardImgSpan" style='display:none;'>
								<input type="image" name="" id="image_idcard" value=""  style="margin-top: 15px;" src="icon/notIn.jpg" disabled="disabled"/>
							</span>
						</dt>  
						<dd id="idcardInfo"></dd>
						</a> 
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('Aisino_A90_idcardActivity')"><img src="./newstyle/images/write.png"/></a></h3>
				</div> 




				<div class="to-now"> 
					<div class="tonow"> 
					</div> 
					<dl> <a href="javascript:void(0);"  onclick="toActivity('ErrorActivity')">
							<dt>
								<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;读取老人卡信息</b> 
								<span id="" class="imgSpan" style='display:none;'>
									<input type="image" name="" id="" value="" style="margin-top: 15px;" src="icon/notIn.jpg" disabled="disabled"/>
								</span>
							</dt> 
							<dd  id="oldCardInfo"></dd>
							</a>
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('ErrorActivity')"><img src="./newstyle/images/write.png"/></a></h3>  
				</div>


				<div class="to-now"> 
					<div class="tonow"> 
					</div> 
					<dl> <a href="javascript:void(0);"  onclick="toActivity('TakePictureActivity')">
							<dt>
								<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;采集人脸</b> 
								<span id="" class="imgSpan"  style='display:none;'>
									<input type="image" name="" id="image_picture" value="" style="margin-top: 15px;" src="icon/notIn.jpg" disabled="disabled"/>
								</span>
							</dt> 
							<dd  id="pictureInfo"></dd>
							</a>
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('TakePictureActivity')"><img src="./newstyle/images/write.png"/></a></h3>  
				</div>



				<div class="to-now"> 
					<div class="tonow"> 
					</div> 
					<dl> <a href="javascript:void(0);"  onclick="toActivity('OtherInfoActivity')">
							<dt>
								<b><img src="./newstyle/images/footer002.png" style='width: 18px;'/>&nbsp;其他信息录入</b> 
								<span id="" class="imgSpan"  style='display:none;'>
									<input type="image" name="" id="image_other" value="" style="margin-top: 15px;" src="icon/notIn.jpg" disabled="disabled"/>
								</span>
							</dt> 
							<dd  id="otherInfo"></dd>
							</a>
					</dl>
					<h3><a href="javascript:void(0);"  onclick="toActivity('OtherInfoActivity')"><img src="./newstyle/images/write.png"/></a></h3>  
				</div>



			</header>
 
		</section>
		<!--底部不够-->
		<div style="margin-bottom: 9%;"></div>
	</div> 

	<footer class="buy-footer fixed-footer">  
				<input type="button" id="sub" value="提交" onclick="checkUp()" />
	</footer>

</body>
</html>

 
 